import 'package:flutter_test/flutter_test.dart';
import 'package:audio_output_device_new/audio_output_device_new.dart';
import 'package:audio_output_device_new/src/platform_interface/audio_output_device_new_platform_interface.dart';
import 'package:audio_output_device_new/src/method_channel/audio_output_device_new_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAudioOutputDeviceNewPlatform
    with MockPlatformInterfaceMixin
    implements AudioOutputDeviceNewPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final AudioOutputDeviceNewPlatform initialPlatform = AudioOutputDeviceNewPlatform.instance;

  test('$MethodChannelAudioOutputDeviceNew is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAudioOutputDeviceNew>());
  });

  test('getPlatformVersion', () async {
    AudioOutputDeviceNew audioOutputDeviceNewPlugin = AudioOutputDeviceNew();
    MockAudioOutputDeviceNewPlatform fakePlatform = MockAudioOutputDeviceNewPlatform();
    AudioOutputDeviceNewPlatform.instance = fakePlatform;

    expect(await audioOutputDeviceNewPlugin.getPlatformVersion(), '42');
  });
}
